package week259

func FinalValueAfterOperations(operations []string) int {
	opera := map[string]int{
		"X++": 1,
		"++X": 1,
		"--X": -1,
		"X--": -1,
	}

	x := 0

	for _, v := range operations {
		if i, ok := opera[v]; ok {
			x = x + i
		}
	}

	return x

}
